import {AfterViewInit, Component, Inject, Optional} from '@angular/core';
import {GnForm} from "geminis-ng";
import {MAT_DIALOG_DATA} from "@angular/material";

@Component({
  selector: 'gn-manage-role-edit',
  templateUrl: './role-edit.component.html'
})
export class RoleEditComponent extends GnForm implements AfterViewInit {

  constructor(@Optional() @Inject(MAT_DIALOG_DATA) private roleId: any) {
    super();
  }

  ngAfterViewInit(): void {
    if (this.roleId) {
      this.form.loadValue(this.roleId);
    }
  }

}
